//
//  Book.m
//  oc_类的定义_圆
//
//  Created by blue on 16/4/7.
//  Copyright (c) 2016年 zzn. All rights reserved.
//

#import "Book.h"

@implementation Book
-(id)init{
    self =[super init];
    if(self){
        _name=@"C program";
        _price = 34;
    }
    return self;
}
-(id)initWithName:(NSString *)name{
    self = [super init];
    if(self){
        _name = name;
    }
    return self;
}
-(id)initWithPrice:(double)price{
    self = [super init];
    if(self){
        _price = price;
    }
    return self;
}
-(id)initWithName:(NSString *)name andPrice:(double)price{
    
    if(self=[super init]){
        _name = name;
        _price = price;
    }
    return self;
}

-(NSString *)name{
    return _name;
}

-(double)price{
    return _price;
}
@end
